package router

import (
	"github.com/labstack/echo/v4"
	"longmen/server/internal/api"
)

func initPayRoute(group *echo.Group, base api.Controller, authFunc echo.MiddlewareFunc) {
	//recharge
	group.POST("/recharge/getPriceList", base.GetPriceList)

	//充值
	group.POST("/charge/orderResultNotify", base.OrderResultNotify)
	group.POST("/charge/callBackHtml", base.CalBackHtml)
	group.POST("/charge/searchOrder", base.SearchOrder, authFunc)
	group.POST("/charge/chargePriceList", base.GetPriceList)
	group.POST("/charge/orderList", base.OrderList, authFunc)
	group.POST("/charge/commitOrder", base.CommitOrder, authFunc) //充值订单

	//订单
	group.POST("/order/getPaymentApiList", base.GetPaymentApiList, authFunc) //支付帳號列表
	group.POST("/order/getDepositList", base.GetDepositList, authFunc)       //儲值列表
	group.POST("/order/getSpendTypeList", base.GetSpendTypeList)             //消費類型
	group.POST("/order/getSpendList", base.GetSpendList, authFunc)           //消费明细
	group.POST("/order/getIncomeList", base.GetIncomeList, authFunc)         //收入明細
	group.POST("/order/send", base.SendOrder, authFunc)                      //建立訂單

	//支付
	group.POST("/payment/isoGetOrderNo", base.IsoGetOrderNo, authFunc)     // 获取iso支付订单号
	group.POST("/payment/isoProductPay", base.IsoProductPay, authFunc)     // iso内支付
	group.POST("/payment/getProductPriceList", base.GetProductPriceList)   // 产品列表
	group.POST("/payment/applyHsqPayment", base.ApplyHsqPayment, authFunc) // 慧收钱
	group.POST("/payment/hsqPaymentCallBack", base.HsqPaymentCallBack)     // 慧收钱
	group.POST("/payment/getPaymentList", base.GetPaymentList, authFunc)   // 充值记录查询
	group.POST("/payment/applyAliPayment", base.ApplyAliPayment, authFunc) // 慧收钱
	group.POST("/payment/aliPaymentCallBack", base.AliPaymentCallBack)     // 慧收钱

	//提款
	group.POST("/withdraw/editCashAccount", base.EditCashAccount)
	group.POST("/withdraw/getAccount", base.GetAccount)
	group.POST("/withdraw/withdrawlog", base.WithdrawLog)
	group.POST("/withdraw/banks", base.Banks)
	group.POST("/withdraw/add", base.AddWithdraw)
	group.POST("/withdraw/withdraws", base.Withdraws)
	group.POST("/withdraw/verifyWithdrawPass", base.VerifyWithdrawPass)

	//道具
	group.POST("/prop/getPropList", base.GetPropList)
}
